#include <stdio.h>
#include <string.h>
#include <string.h>

int removeDuplicates(int* nums, int numsSize) {
int i = 0;
int k = numsSize;
for (i = 0; i < numsSize; i++)
{
    int j = i + 1;

    while (j!=k)
    {
        if (nums[i] == nums[j])
        {
            if (j == k)
            {
                nums[j] = 0;
            }
            else
            {
                memcpy(nums + j, nums + j + 1, sizeof(int) * (k - 2));
                nums[k] = 0;
                k--;
            }
        }
        else
        {
            j++;
        }
    }
}
return k;
}
int main()
{
    int num[] = {0,0,1,1,1,2,2,3,3,4};
    int ret = removeDuplicates(num, 10);
    printf("%d\n", ret);
    return 0;
}